package com.best.condition;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @author Jiang Akang
 * employeeId: BG435424
 * @date 2020/10/25
 **/
//自定义逻辑返回需要导入的组件
public class MyImportSelector implements ImportSelector {
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        //返回值，就是导入到容器中的组件全类名
        //AnnotationMetadata:当前标注@Import注解的类的所有注解信息
        return new String[]{"com.best.bean.Color","com.best.bean.Blue"};

    }
}
